#ifndef COMMAND_H
#define COMMAND_H

#include "common_head.h"

//int send_cd_message(int client_fd,data msg,char *path);

//int recv_cd_message(int client_fd,data msg,char *path);

int handler_cd(int socket, data msg, char *wk_path);

void handle_ls(char *cur_path, data *msg, int socket_fd);

void send_remove_message(char *cur_path, data *msg, int socket_fd);

void recv_remove_message(int socket_fd, data *response);


int handler_puts(int sockfd, data msg, char *path);

int handler_gets(int sockfd, data msg, char *wk_path);

void handler_mkdir(char *cur_path, data *msg, int socket_fd);

/**
 * 计算文件的SHA-256哈希值
 *
 * @param filename 文件名
 * @param hash 输出哈希值字符串的指针
 */
void compute_sha256_hash(const char *filename, char **hash);

#endif